package com.weixinli.beans;

import java.io.Serializable;

public class Subject implements Serializable{
	private int sid;//题目编号
	private int tid;//关联测试编号
	private String scontent;//题目选项
	private String sscore;//题目得分
	private String qcontent;//题目内容
	private static final long serialVersionUID = 1L;
	
	@Override
	public String toString() {
		return "Subject [sid=" + sid + ", tid=" + tid + ", scontent="
				+ scontent + ", sscore=" + sscore + ", qcontent=" + qcontent
				+ "]";
	}

	public int getSid() {
		return sid;
	}

	public void setSid(int sid) {
		this.sid = sid;
	}

	public int getTid() {
		return tid;
	}

	public void setTid(int tid) {
		this.tid = tid;
	}

	public String getScontent() {
		return scontent;
	}

	public void setScontent(String scontent) {
		this.scontent = scontent;
	}

	public String getSscore() {
		return sscore;
	}

	public void setSscore(String sscore) {
		this.sscore = sscore;
	}

	public String getQcontent() {
		return qcontent;
	}

	public void setQcontent(String qcontent) {
		this.qcontent = qcontent;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((qcontent == null) ? 0 : qcontent.hashCode());
		result = prime * result
				+ ((scontent == null) ? 0 : scontent.hashCode());
		result = prime * result + sid;
		result = prime * result + ((sscore == null) ? 0 : sscore.hashCode());
		result = prime * result + tid;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Subject other = (Subject) obj;
		if (qcontent == null) {
			if (other.qcontent != null)
				return false;
		} else if (!qcontent.equals(other.qcontent))
			return false;
		if (scontent == null) {
			if (other.scontent != null)
				return false;
		} else if (!scontent.equals(other.scontent))
			return false;
		if (sid != other.sid)
			return false;
		if (sscore == null) {
			if (other.sscore != null)
				return false;
		} else if (!sscore.equals(other.sscore))
			return false;
		if (tid != other.tid)
			return false;
		return true;
	}

	public Subject(int sid, int tid, String scontent, String sscore,
			String qcontent) {
		super();
		this.sid = sid;
		this.tid = tid;
		this.scontent = scontent;
		this.sscore = sscore;
		this.qcontent = qcontent;
	}

	public Subject() {
		super();
	}
 }
